<template>
    <div id="app">
        <div class="header">网页头部</div>
        <div class="content">
            <ul>
                <!-- 循环组件，传递对象刚给single组件 -->
                <Single v-for="item in myList" :el="item" />
            </ul>
        </div>
        <div class="footer">网页底部</div>
    </div>
</template>
<script>
import list from "./data.js";
import Single from "./components/Single.vue";
export default {
    data() {
        return {
            myList: list,
            el: {},
        };
    },
    components: {
        Single,
    },
    mounted() {},
};
</script>
<style>
* {
    margin: 0;
    padding: 0;
}

.footer,
.header {
    width: 1200px;
    height: 80px;
    margin: 0 auto;
    background-color: skyblue;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 40px;
    color: #fff;
}

.footer {
    height: 300px;
    font-size: 100px;
}

.content {
    width: 1200px;
    padding: 10px 0;
    margin: 0 auto;
}

ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
}
</style>
